<?php

   /*******************************************************************
    * File    : Address.php
    * Version : $Id: Address.php,v 1.7 2008/08/08 13:07:41 wolfi Exp $
    * Author  : wolfgang.schaefer@mPAY24.com
    *******************************************************************/

   class Address {
      // set-methods
      function setFirstName($name) {
         $this->firstname = substr($name, 0, 49);
      }

      function setLastName($name) {
         $this->lastname = substr($name, 0, 49);
      }

      function setStreet($street) {
         $this->street = substr($street, 0, 49);
      }

      function setZip($zip) {
      	$this->zip = substr($zip, 0, 49);
      }

      function setCity($city) {
         $this->city = substr($city, 0, 49);
      }

      function setCountry($country) {
         $this->country = substr($country, 0, 49);
      }

      function setEmail($email) {
      	$len = strlen($email);

      	if($len < 64) {
      		$this->email = $email;
	} else {
      		$this->email = substr($email, 0, 63);
        }
      }

      // get-methods
      function getFirstName() {
         return $this->firstname;
      }

      function getLastName() {
         return $this->lastname;
      }

      function getStreet() {
         return $this->street;
      }

      function getCity() {
         return $this->city;
      }

      function getCountry() {
         return $this->country;
      }

      function getEmail() {
         return $this->email;
      }

      function getZip() {
         return $this->zip;
      }

      // member-variables
      var $firstname;        
      var $lastname;
      var $street;
      var $zip;
      var $city;
      var $country;
      var $email; 
   }
?>
